import { View } from "@tarojs/components";
import ByQrcode from "@/components/ui/ByQrcode";
import PopupContainer from "@/components/app/PopupContainer";

import setting from "@/utils/setting";
import ByText from "@/components/ui/ByText";

// k客户确认
export default ({
  recordMainId,
  onCancel,
}: {
  recordMainId: number;
  onCancel: () => void;
}) => {
  return (
    <>
      <PopupContainer title="客户确认" onCancel={onCancel}>
        <View className="p-5 text-center">
          <ByQrcode
            text={setting.webUrl + "/customer/confirm/" + recordMainId}
          />

          <ByText block size="sm" type="second" className="text-center">
            手机扫一扫确认
          </ByText>
        </View>
      </PopupContainer>
    </>
  );
};
